package com.foreknow.oop.hw8;

import java.util.Random;

public class Computer {
    private String ComputerUser;    // 电脑角色
    private int punch;              // 出拳
    private int score;              // 电脑得分

    public Computer() {
    }

    public String getComputerUser() {
        return ComputerUser;
    }

    public void setComputerUser(String computerUser) {
        ComputerUser = computerUser;
    }

    public int getPunch() {
        return punch;
    }

    public void setPunch(int punch) {
        this.punch = punch;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    /**
     * 出拳方法
     * @return
     */
    public int showFirst(){
        int punch = new Random().nextInt(3);
        System.out.printf("电脑出拳：%s\n",Util.getStringPunch(punch));
        return punch + 1;
    }
}
